<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>JPetStore</title>
    <link rel="stylesheet" href="../css/jpetstore.css" type="text/css"/>
    <link rel="stylesheet" href="../css/jquery-ui.css" type="text/css"/>
    <script th:src = "@{/JS/jquery-3.2.1.js}"></script>
    <script th:src = "@{/JS/jquery-ui.js}"></script>
</head>
<body>
    <div th:replace="/common/header.html"></div>

    <div id="Content">

        <div id="BackLink">
            <a href = "main">Return to Main Menu</a>
        </div>
        <div id="Catalog">

            <h2 th:text="${category.name}">category的ID</h2><!--之前页面往session里面存对象，现在拿出来-->

            <table>

                <tr>
                    <th>Product ID</th>
                    <th>Name</th>
                </tr>

                <tr th:each="product:${productList}">
                    <td><a th:href="@{'/catalog/viewProduct?productId='+${product.getProductId()}}" th:text="${product.getProductId()}"></a></td>
                    <td th:text="${product.getName()}"></td>
                </tr>
            </table>

        </div>
    </div>

    <div th:replace="/common/footer.html"></div>
</body>
</html>